package com.xinqi.modules.prepare.video.manager;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xinqi.common.mybatis.data.service.BaseService;
import com.xinqi.modules.prepare.video.domain.PrepareVideoEntity;
import com.xinqi.modules.prepare.video.domain.PrepareVideoPointEntity;
import com.xinqi.modules.prepare.video.dto.req.PrepareVideoPointQueryDTO;
import com.xinqi.modules.prepare.video.dto.rsp.PrepareVideoPointResultDTO;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 备课区互动视频环节管理层
 *
 * @author: system
 * @date: 2023/03/19
 */
public interface PrepareVideoPointManager extends BaseService<PrepareVideoPointEntity> {

    /**
     * 自定义分页查询
     */
    Page<PrepareVideoPointResultDTO> findPage(Page<Object> page, PrepareVideoPointQueryDTO query);

    /**
     * 自定义列表查询
     */
    List<PrepareVideoPointResultDTO> findList(PrepareVideoPointQueryDTO query);

    /**
     * 根据id查询 备课区互动视频环节数据
     */
    PrepareVideoPointEntity findById(Long id);

    /**
     * 根据id删除 备课区互动视频环节数据
     */
    @Transactional(rollbackFor = Exception.class)
    boolean deleteById(Long id);


    List<PrepareVideoPointEntity> findBVideoId(Long videoId);

    @Transactional(rollbackFor = Exception.class)
    void copy(PrepareVideoEntity source, PrepareVideoEntity tagert);

    @Transactional(rollbackFor = Exception.class)
    void move(PrepareVideoEntity entity);

    @Transactional(rollbackFor = Exception.class)
    Boolean deleteByVideoId(Long videoId);
}
